let div1 = document.getElementById("div1");
let div2 = document.getElementById("div2");
let div3 = document.getElementById("div3");

div1.addEventListener("click", function (e) {
    console.log(e.target);
    console.log("div1.click事件响应")
});

div2.addEventListener("click", function (e) {
    console.log(e.target);
    console.log("div2.click事件响应")
});

div3.addEventListener("click", function (e) {
    console.log(e.target);
    console.log("div3.click事件响应")
    e.stopPropagation();  //停止事件冒泡
});

document.addEventListener("click", function (e) {
    console.log(e.target);
    console.log("document.click事件响应")
});

window.addEventListener("click", function (e) {
    console.log(e.target);
    console.log("window.click事件响应")
});